package com.xmy.cultivate.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.StoreGoodsOrder;
import com.xmy.cultivate.mapper.StoreGoodsOrderMapper;
import com.xmy.cultivate.service.IStoreGoodsOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 加订表 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2024-07-30
 */
@Service
public class StoreGoodsOrderServiceImpl extends ServiceImpl<StoreGoodsOrderMapper, StoreGoodsOrder> implements IStoreGoodsOrderService {

    @Autowired
    StoreGoodsOrderMapper storeGoodsOrderMapper;


    @Override
    public Integer getMaxLessonNum(Integer yearPart,
                                   Integer quarterNum,
                                   Long schoolId,
                                   Integer yearClassId,
                                   Long classTypeId,
                                   Long subjectsId,
                                   Integer lessonType,
                                   Long goodsTypeId,
                                   Integer status,
                                   Integer type){
        return storeGoodsOrderMapper.getMaxLessonNum(yearPart,quarterNum,schoolId,yearClassId,classTypeId,subjectsId,lessonType,goodsTypeId,status,type);
    }

    @Override
    public IPage<StoreGoodsOrder> getOrderList(IPage<?> page,
                                               Integer yearPart,
                                               Integer quarterNum,
                                               Long schoolId,
                                               Integer yearClassId,
                                               Long classTypeId,
                                               Long subjectsId,
                                               Integer lessonType,
                                               Long goodsTypeId,
                                               Integer status,
                                               Integer type){
        return storeGoodsOrderMapper.getOrderList(page,yearPart,quarterNum,schoolId,yearClassId,classTypeId,subjectsId,lessonType,goodsTypeId,status,type);
    }

    @Override
    public List<StoreGoodsOrder> getOrderListAll(
            Integer yearPart,
            Integer quarterNum,
            Long schoolId,
            Integer yearClassId,
            Long classTypeId,
            Long subjectsId,
            Integer lessonType,
            Long goodsTypeId,
            Integer status,
            Integer type,
            Integer getType){
        return storeGoodsOrderMapper.getOrderListAll(yearPart,quarterNum,schoolId,yearClassId,classTypeId,subjectsId,lessonType,goodsTypeId,status,type,getType);
    }
}
